package com.tkjt.pms.calc.core.task;

import java.util.concurrent.Callable;

import com.tkjt.pms.calc.FormulaExecutor;
import com.tkjt.pms.calc.common.IndexCalcParallel;
import com.tkjt.pms.common.IndexParam;

public class CalcTask implements Callable<Boolean> {

	private IndexParam indexParam;
	private FormulaExecutor formulaExecutor;
	private IndexCalcParallel indexCalcParallel;

	public CalcTask(IndexParam indexParam, FormulaExecutor formulaExecutor, IndexCalcParallel indexCalcParallel) {
		this.indexParam = indexParam;
		this.formulaExecutor = formulaExecutor;
		this.indexCalcParallel = indexCalcParallel;
	}

	@Override
	public Boolean call() throws Exception {

		return formulaExecutor.doExecutor(indexParam, indexCalcParallel);

	}

}
